#pragma once
#include <ios>
#include <cstddef>


namespace JHCPP
{
	namespace stream
	{	
		template <typename T>
		class TBufferAllocator
		{
		public:
			typedef T char_type;

			static char_type* allocate(std::streamsize size)
			{
				return new char_type[static_cast<std::size_t>(size)];
			}

			static void deallocate(char_type* ptr, std::streamsize /*size*/)
			{
				delete [] ptr;
			}
		};

	}//end of namespace stream
}//end of namespace JHCPP
